function [ feature_vals, feature_set_struct, feature_set_name ] = extract_all_feature( data, header, frames, feature_set, is_training )
%EXTRACT_ALL_FEATURE Summary of this function goes here
%   Detailed explanation goes here
if ~exist('is_training', 'var')
    is_training = 0;
end

parsed_feature_set = parse_feature_set(feature_set, header);

% acquire a sample feature to determine # of channels
[tmp_f_val feature_set_struct] = extract_feature_set(data, header, frames(1:2, 1), parsed_feature_set);
feature_vals = zeros(size(frames, 2), length(tmp_f_val));
feature_set_name = get_feature_name(feature_set_struct);

% acquire feature values of all frames
for i=1:size(frames, 2)
    if ~is_training || frames(3, i)
        tmp_f = frames(:, i);
        tmp_f_val = extract_feature_set(data, header, tmp_f(1:2), parsed_feature_set);
        feature_vals(i, :) = tmp_f_val;
    end
    if mod(i, 50)==0
        disp(['Extracting features - ' num2str(round(i/size(frames,2)*100)) '%']);
    end
end
disp(['Extracting features - 100%']);

end

